package com.youlu.campus.website.controller;

import com.youlu.campus.common.base.QResult;
import com.youlu.campus.website.entity.Partner;
import com.youlu.campus.website.service.PartnerService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 合作伙伴控制层
 *
 * @author su
 * @date 2025/08/25
 */
@RestController
@RequestMapping("/api/partner")
public class PartnerController {

    @Resource
    private PartnerService partnerService;

    /**
     * 查询全部合作伙伴列表
     *
     * @return QResult<Page < Partner>>
     */
    @PostMapping("/find-all")
    public QResult<List<Partner>> findAll() {
        List<Partner> list = partnerService.findAll();
        return QResult.success(list);
    }
}